package com.wootion.cims.module.communityresidence.residencelist.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Author: LanQiang
 * @Date: 2022/12/14/9:55
 * @Description: 批量添加规则
 */
@Data
@ApiModel(value = "批量添加规则")
public class Rules implements Serializable {
    private static final long serialVersionUID = 872181926276361091L;
    
    @Pattern(regexp = "^[\\u4e00-\\u9fa5_a-zA-Z0-9]+$",message = "前缀必须是数字，字母或中文")
    @ApiModelProperty(value = "前缀")
    private String prefix;

    @Pattern(regexp = "^(\\d?[1-9]|[1-9]0)$",message = "楼层号格式不正确")
    @ApiModelProperty(value = "楼层号")
    private String floor;

    @Pattern(regexp = "^((\\d[1-9])|([1-9]\\d)|([1-9]\\d{1,2})|[1-9])$",message = "房间号格式不正确")
    @ApiModelProperty(value = "房间号")
    private String room;

    @Pattern(regexp = "^[\\u4e00-\\u9fa5_a-zA-Z0-9]+$",message = "前缀必须是数字，字母或中文")
    @ApiModelProperty(value = "后缀")
    private String suffix;
}
